<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		//用函数封装对像
     function createPerson(name,qq) //构造函数
     {

		this.name=name;
		this.qq=qq;

		this.showName=function(){
			alert('我的名字叫：'+this.name);
		}

		this.showQQ=function(){
			alert('我的QQ:'+this.qq);
		}


     };


       var obj=new createPerson('应华','670845');
       var obj2=new createPerson('应华2','6708452');
       obj.showName();
	</script>
</head>
<body>
	
</body>
</html>